package com.yunxi.service.localService.sys;

import com.yunxi.core.service.IServicePlus;
import com.yunxi.model.sys.RoleUser;
import com.yunxi.sys.pojo.RoleMenuVO;
import com.yunxi.sys.pojo.RoleUserVO;
import com.yunxi.sys.pojo.RoleVO;
import com.yunxi.sys.pojo.UserVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by xuruzi on 2017/5/3.
 */
public interface RoleUserService extends IServicePlus<RoleUser> {
    @Transactional(timeout = 5000,readOnly = true)
    List listByRoleId(String userId);

    @Transactional(timeout = 5000,readOnly = true)
    List listByRoleCode(String roleCode);

    @Transactional(timeout = 5000,rollbackFor = Exception.class)
    void saveRoleUserList(RoleUserVO roleMenu, String userId);

    void delById(String userId);

    List<RoleVO> listByDomainId(String domainId);

    List<RoleUserVO> listByUserId(String userId);

    void saveRoleUserList(RoleUserVO roleUser);

    List<RoleVO> listRoleByAccountNo(String accountNo);

    List<UserVO> userListByRoleId(String roleId);
}
